package com.xnyzc.lhy.mis.service.account;

import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.mis.entity.account.OaDAccountAdjustment;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xnyzc.lhy.mis.entity.param.account.AccountAdjustmentParam;
import com.xnyzc.lhy.mis.entity.param.account.OaDAccountAdjustmentDetailParam;

import java.math.BigDecimal;

/**
 * <p>
 * 司机账户调整表 服务类
 * </p>
 *
 * @author cuichaoqun
 * @since 2019-10-19
 */
public interface IOaDAccountAdjustmentService extends IService<OaDAccountAdjustment> {

    /**
     * 查询司机账户调整状态
     * @return
     */
    Rv queryAdjustmentStatue();
    /**
     * 批量插入
     * 账户调整表 和 账户调整明细表
     * */
    Rv insertIOaDAccountAdjustment(OaDAccountAdjustmentDetailParam oaDAccountAdjustmentDetailParam);

    /**
     * 修改审核状态 调整状态(0审核中、1审核通过、2审核失败)
     * */
    Rv updateIOaDAccountAdjustmentStatue(Integer adjustmentState,Long adjustmentId);

    /**
     * 创建司机冻结记录
     * @param driverId 司机ID
     * @param freezeAmount 冻结金额
     */
    void saveFreezeBalance(Long driverId, BigDecimal freezeAmount);

    /**
     * 创建司机账单流水
     *
     * @return
     */
    void saveOaDBill(String orderNo, BigDecimal drawFee, Long driverId);

    /**
     * 创建司机账单流水：活动奖励
     *
     * @return
     */
    void saveActivityOaDBill(String orderNo, BigDecimal drawFee, Long driverId);

    /**
     * 删除司机账户调整表
     * */
    Rv deleteDateIOaDAccountAdjustment(Long adjustmentId);
    /**
     * 司机账户调整表
     * */
    Rv queryDateIOaDAccountAdjustment(AccountAdjustmentParam accountAdjustmentParam);

    /**
     * 下载账户调整模板
     * @return
     */
    Rv getAccountAdjustmentDownloadTemplate();
}
